#!/usr/bin/env python
# encoding=utf-8

from xtls.codehelper import get_ip


class CrawlerStatus(object):
    NO_RESULT = 0x1
    GOT_CAPTCHA = 0x2
    SUCCESS = 0x4


DB = 'crawler_news'
COLL_TODO = 'todoJob'
COLL_DONE = 'doneJob'
COLL_STATUS = 'companyStatus'
KEYSPACE = 'crawler'

if get_ip().startswith('192.168'):
    MONGO_HOST = '127.0.0.1'
    MONGO_PORT = 27017
else:
    MONGO_HOST = '10.132.23.104'
    MONGO_PORT = 27017
    CASSANDRA_CONTACT_POINTS = ['10.252.101.196', '10.162.88.158', '10.51.35.222']
